<layout name="master"/>
<ul class="breadcrumb no-border no-radius b-b b-light pull-in">
    <li><a href="index.html"><i class="fa fa-home"></i>商品管理</a></li>
    <li class="active">商品列表</li>
</ul>
<div class="m-b-md">
    <h3 class="m-b-none">商品列表</h3>
</div>
<div class="row">
    <div class="col-sm-12">
        <section class="panel panel-default">
            <header class="panel-heading font-bold">
                <div class="row">
                    <div class="col-md-4">商品列表</div>
                    <div class="col-md-4 col-md-offset-4">
                        <form class="form-inline" method="get">
                            <select name="brand" class="form-control input-sm">
                                <option value="">品牌</option>
                                <volist name="brandData" id="v">
                                <option value="{$v['bid']}">{$v['bname']}</option>
                                </volist>
                            </select>
                            <select name="class" class="form-control input-sm">
                                <option value="">分类</option>
                                <volist name="classData" id="v">
                                    <option value="{$v['cid']}">{$v['cname']}</option>
                                </volist>
                            </select>
                            <div class="form-group">
                                <input name="search" type="text" class="form-control input-sm" placeholder="请输入商品名称">
                            </div>
                            <button type="submit" class="btn btn-default input-sm">搜索</button>
                        </form>
                    </div>
                </div>
            </header>
            <div class="panel-body">
                <table id="MyStretchGrid" class="table table-striped datagrid m-b-sm">
                    <thead>
                        <tr>
                            <th>编号</th>
                            <th>商品名称</th>
                            <th>价格</th>
                            <th>库存</th>
                            <th>点击数</th>
                            <th>添加时间</th>
                            <th>操作</th>
                        </tr>
                    </thead>
                    <tbody>
                    <foreach name="list" item="vo">
                    <tr>
                        <td>{$vo['gid']}</td>
                        <td>{$vo['gname']}</td>
                        <td>
                            <ul>
                                <li>市场价<del>{$vo['mprice']}</del></li>
                                <li>商城价<span>{$vo['xmprice']}</span></li>
                            </ul>
                        </td>
                        <td>{$vo['ginventory']}</td>
                        <td>{$vo['gclick']}</td>

                        <td>{$vo['gptime']}</td>
                        <td>
                            <a title="货品列表"  href="{:u('GoodsList/lists',['gid'=>$vo['gid']])}"><i class="fa fa-align-justify"></i></a>
                            <a title="编辑" href="{:u('editGoods',['gid'=>$vo['gid']])}"><i class="fa fa-pencil"></i></a>
                            <a title="删除" attr-url="admin/goods/delGoods" attr-id="{$vo['gid']}" class="xm-del"><i class="fa fa-times text-danger text"></i></a>
                        </td>
                    </tr>
                    </foreach>
                    </tbody>
                </table>
                <!--分页样式书写-->
                <style>
                    /*其他页、上一页、下一页样式*/
                    .pagination .num,.prev,.next{
                        position: relative;
                        float: left;
                        padding: 6px 12px;
                        margin-left: -1px;
                        line-height: 1.42857143;
                        color: #337ab7;
                        text-decoration: none;
                        background-color: #fff;
                        border: 1px solid #ddd
                    }
                    /*当前分页样式*/
                    .pagination .current{
                        position: relative;
                        float: left;
                        padding: 6px 12px;
                        margin-left: -1px;
                        line-height: 1.42857143;
                        color: red;
                        text-decoration: none;
                        background-color: #fff;
                        border: 1px solid #ddd
                    }
                    .pagination .headerPage{
                        position: relative;
                        float: left;
                        padding: 6px 12px;
                        text-decoration: none;
                        background-color: #fff;

                    }
                </style>
                <!--分页样式结束-->
                <!--展示分页-->
                <div class="col-sm-12 text-right text-center-xs">
                    <ul class="pagination pagination-sm m-t-none m-b-none">
                        {$page}
                    </ul>
                </div>

            </div>
        </section>
    </div>
</div>